package leetcode;

import java.util.Scanner;

public class LengthOfLastWorld {
    public static void main(String[] args) {
        //求字符串最后一个单词的长度
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String[] s1 = s.split(" ");
        System.out.println(s1[s1.length-1].length());
    }
}
